﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using FluentNHibernate.Mapping;

namespace Barry.BarbeSystem.Models
{
    public class Employee
    {

        public virtual int Id { set; get; }

        /// <summary>
        /// 项目类别
        /// </summary>
        [Required(ErrorMessage = "请填写员工姓名")]
        [MaxLength(20)]
        [Display(Name = "员工姓名")]
        public virtual string Name { set; get; }


       
        [MaxLength(2000)]
        public virtual string Pwd { set; get; }


        [MaxLength(2000)]
        [Display(Name = "备注")]
        public virtual string Remarks { set; get; }
    }


    public class EmployeeMap:ClassMap<Employee>
    {
        public EmployeeMap()
        {
            Id(i => i.Id);
            Map(i => i.Name).Length(20).Not.Nullable();
            Map(i => i.Remarks).Length(2000);
            Map(i => i.Pwd).Length(2000);

        }
    }
}